<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>

<head>

<title>Getting Started - phoneME Feature Software (MR4)</title>
    <link rel="stylesheet" href="./style/document.css" type="text/css">

<!--
<style type="text/css"> /* <![CDATA[ */
@import "/branding/css/tigris.css";
@import "/branding/css/inst.css";
/* ]]> */</style>
<link rel="stylesheet" type="text/css" href="/branding/css/print.css" media="print" />
<script src="/branding/scripts/tigris.js" type="text/javascript"></script>

<script src="/branding/scripts/alm.js" type="text/javascript"></script>
<style type="text/css">
/* <![CDATA[ */
@import "/brinding/css/alm.css";
/* ]]> */
</style>
-->

<!--
<title>Getting Started - phoneME Feature Software (MR4)</title>
<link rel="stylesheet" href="./style/tigris.css" type="text/css">
<link rel="stylesheet" href="./style/inst.css" type="text/css">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="version" content="4.5.2.148.4" />

<style type="text/css"></style>
-->

</head>

<body  class="composite">
<div class="strut">&nbsp;</div>
</td>
<td id="midcol">
<div id="bodycol">

<!--  ================= BEGIN PAGE BODY (Ignore Everything Above)  ============ -->

<!-- Header -->
<table class="full-width">
  <tr>
    <td align="center" class=sun-darkblue>
      <h1>Getting Started</h1>
      <h2>phoneME&#153; Feature Software (MR4)</h2>
      <h4>April 2009</h4>
    </td>
  </tr>
  <tr>
    <td class=sun-lightblue>&nbsp;</td>
  </tr>
</table>
<p>
<!-- End Header -->

<!-- BEGIN PAGE TITLE -->
<div id="projecthome" class="app"> <h2><font color="#225577">Building a phoneME
Feature Software Reference Port<span class="style1"></span></font></h2>
<!-- END PAGE TITLE -->

<p>
<a href="../index.html">home</a> | <a href="./index_feature.html">first</a> | 
<a href="./cldc_feature.html">prev</a> 
<p>

The phoneME Feature Software is the Open Source version of Sun Microsystems' commercial 
implementation, the Sun Java Wireless Client software. The phoneME Feature software is 
built on top of CLDC, the Open Source version of Sun Microsystems' Connected Limited 
Device Configuration, HotSpot Implementation.
<P>
This document has the following sections:
<p>
<ul>
<li><a href="#win32">Building phoneME Feature Software on a Windows x86 Build Platform</a>
<li><a href="#phoneme_docs">Building phoneME Feature Software Documentation</a>
</ul>
<p>

For proper building and performance, your system must meet the 
requirements provided in <A HREF="begin_feature.html">Before You Begin</A>.
<P>



<!-- BEGIN SECTION HEAD -->
<hr noshade="noshade" size="1">
<a name="win32"></a><h3>Building phoneME Feature Software on a Windows x86 Build Platform</h3>
<!-- END SECTION HEAD -->
<p>

This section provides basic instructions for building a default phoneME Feature software 
implementation for the JavaCall porting layer on a Windows x86 target platform.
<p>


<a name="set_win_var"></a>
<strong>Setting Variables for a Windows x86 Build Platform</strong>
<p>

To properly build the phoneME Feature software on a Windows platform, you must set the
environment variables shown in <a href="#table5-1">TABLE 5-1</A>. 
<P>

<a name="table5-1"></a>
<TABLE CLASS="Titled" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000"
CELLPADDING=5 CELLSPACING=0>
<CAPTION><b>TABLE 5-1</b> Required Windows x86 Build Variables</CAPTION>
<THEAD>
<TR>
<TH SCOPE="COL" ROWSPAN="1" COLSPAN="1" BGCOLOR="#CCCCCC">
<P CLASS="TableHead"><A NAME="pgfId-473082"></A>Name
</P>
</TH>
<TH SCOPE="COL" ROWSPAN="1" COLSPAN="1" BGCOLOR="#CCCCCC">
<P CLASS="TableHead"><A NAME="pgfId-473084"></A>Description
</P>
</TH>
</TR>
</THEAD>
<TBODY>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P><code>EMULATOR_DIR</code>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>The location where you install the emulator software.  For example,
<code>EMULATOR_DIR=C:/home/chocolate/mr4_emulator/phoneme_feature</code>.
<p>
For more information on setting the <code>%EMULATOR_DIR%</code> variable, see
<a href="./download_feature.html#zip_files">Downloading the Qsound and Emulator
Binary Files</a>. 
</P>
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P><code>MIDP_OUTPUT_DIR</code>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>Location where the output from building phoneME Feature is stored. For example,
<code>MIDP_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/midp</code>.
</P>
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P><code> PCSL_OUTPUT_DIR</code>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>Location where the output from building PCSL is stored. Required for phoneME 
Feature to pick up PCSL libraries. For example,
<code>PCSL_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/pcsl</code>.
</P>
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P><code>CLDC_DIST_DIR</code>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>Required for building phoneME Feature software. Must point to the location of 
CLDC software build output. For example, 
<code>CLDC_DIST_DIR=%BUILD_OUTPUT_DIR%/cldc/javacall_i386_vc/dist</code>.
</P>
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P><code>TOOLS_DIR</code>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>Location of tools generated during build process. Required for building 
phoneME Feature software. For example, <code>TOOLS_DIR=%COMPONENTS_DIR%/tools</code>. 
</P>
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P><code>TOOLS_OUTPUT_DIR</code>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>Defines a directory location for tools-specific output.  For example, 
<code>TOOLS_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/tools</code>
</P>
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P><code>USE_MULTIPLE_ISOLATES</code>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>Required for phoneME Feature to support multitasking.  Must be set to 
<code>true</code>. If not explicitly set to <code>true</code>, the build 
defaults to <code>false</code> and phoneME Feature is built without multitasking 
capability. 
<p>
<b>Note:</b> If you set <code>USE_MULTIPLE_ISOLATES=true</code> to build phoneME 
Feature software, you must also set <code>ENABLE_ISOLATES=true</code> to build 
CLDC, as described in <a href="./cldc_feature.html">Building a CLDC Reference Port</a>. 
</P>
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P><code> JAVACALL_PLATFORM</code>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>Defines the JavaCall porting layer platform, cpu, and compiler. For example, 
<code>JAVACALL_PLATFORM=win32_i386_vc</code>.
</P>
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P><code>JAVACALL_OUTPUT_DIR</code>
</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>Indicates the location where JavaCall porting layer output is stored. For example, 
<code>JAVACALL_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/javacall</code>.
</P>
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P>
<code>USE_VS2005</code>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>
Tells the build system to use Microsoft Visual Studio 2005 as the default compiler
setting, as shown here: <code>USE_VS2005=true</code>.
<p>
<b>Note:</b> If Microsoft Visual Studio 2005 is your default compiler, you do not 
need to set this variable. <code>USE_VS2005=true</code> is set for you in the MR4 
build scripts. However, if you are using some other compiler (which is possible, 
but not supported, in MR4), you <i>must</i> set this variable to 
<code>USE_VS2005=false</code>.
<p>
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P>
<code>USE_ON_DEVICE_DEBUG</code>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>
Supports the use of the emulator binary plugin.  For example,
<code>USE_ON_DEVICE_DEBUG=true</code>.
<p>
<b>Note:</b> This variable must be set to <code>true</code> or building for the 
emulator will fail.
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P>
<code>USE_JAVA_DEBUGGER</code>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>
Supports the use of the emulator binary plugin.  For example,
<code>USE_JAVA_DEBUGGER=true</code>.
<p>
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P>
<code>PRECOMPILED_ODD</code>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>
Supports the use of the On-Device Debugger (ODD) binary plugin.  For example, 
<code>PRECOMPILED_ODD=true</code>.
<p>
<b>Note:</b> This variable must be set to <code>true</code> or building for the 
emulator will fail.
<p>
</TD>
</TR>
<TR>
<TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1">
<P>
<code>ODD_JAR</code>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P>
Sets the path to the On-Device Debugger (ODD) binary plugin.  For example,
<code>ODD_JAR=%EMULATOR_DIR%/phoneme-lib/odd.jar</code>.
<p>
<b>Note:</b> This variable must point to a valid jar location or building for 
the emulator will fail.
<p>
</TD>
</TR>

</TBODY>
</TABLE>
<p>


<a name="build_javacall"></a>
<strong>Building for a Windows x86 Target Platform</strong>
<p>
To build the phoneME Feature software for a Windows x86 target platform, take 
the following steps.
<p>
<ol>
<b><li>Set the</b> <code>MIDP_OUTPUT_DIR</code> <b>variable, as shown here.</b>
<p>
<code>C:\> set MIDP_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/midp</code>
<p>
<b><li>Run the</b> <code>make</code> <b>command as a single command-line string, using
the <code>-C</code> option, as shown here.</b>
<P>
<code>C:\> make -C %COMPONENTS_DIR%/midp/build/javacall PCSL_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/pcsl 
CLDC_DIST_DIR=%BUILD_OUTPUT_DIR%/cldc/javacall_i386_vc/dist TOOLS_DIR=%COMPONENTS_DIR%/tools 
TOOLS_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/tools USE_MULTIPLE_ISOLATES=true 
JAVACALL_PLATFORM=win32_i386_vc JAVACALL_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/javacall 
USE_ON_DEVICE_DEBUG=true USE_JAVA_DEBUGGER=true PRECOMPILED_ODD=true 
ODD_JAR=%EMULATOR_DIR%/phoneme-lib/odd.jar</code>
<P>
<b>Note:</b> It is possible to include optional packages in your Windows x86 
target build.  For more information, see 
<a href="./begin_feature.html#op_pack">Including Optional Packages in Your Build</a>.
</ol>
<p>
The generated output for Windows x86 target platform is found under 
<code>%BUILD_OUTPUT_DIR%/midp</code>.
<p>


<a name="win_usertest"></a>
<strong>Running phoneME Feature on a Windows x86 Target 
Platform</strong>  
<p>
Once you build an implementation of phoneME Feature software, you can run a MIDlet 
using the <a href="./download_feature.html#zip_files">emulator</a>. However, before 
you can do this, you must start the phoneME Feature emulator:
<p>
<ol>
<b><li>Right click on the Device Manager icon to display the Device Manager menu 
and select</b> <code>Exit</code> <b>to stop the Device Manager. (The Device Manager 
icon is in the lower right corner system tray.)</b>
<p>
<b><li>Remove the folder</b> <code>%USERPROFILE%\javame-sdk-pmef</code>
<p>
<b><li>Copy the contents of the</b> <code>%BUILD_OUTPUT_DIR%/midp/SDK</code> 
<b>directory (<em>not</em> the directory itself) into</b> 
<code>%EMULATOR_DIR%</code><b>, the top-level (root) directory of the 
emulation environment. For example,</b> <code>C:\mr4\emulator</code>.
<p>
<b><li>Change to the emulation root directory. For example:</b>
<p>
<code>C:\>cd %EMULATOR_DIR%</code>
<p>
<b><li>Start your phoneME Feature implementation:</b>
<p>
<code>C:\>bin\emulator.exe</code>
<p>
The Device Manager appears in the lower right corner system tray; on the console, the 
command line help appears. You can now use it to run MIDlets. 
</ol>
<p>
For additional information on working with the emulator, see the
<a href="http://java.sun.com/javame/reference/docs/sjwc-2.2/pdf-html/html/build/index.html">
<i>Sun Java Wireless Client Software Build Guide</i></a>.
<p>


<!-- BEGIN SECTION HEAD -->
<hr noshade="noshade" size="1">
<a name="phoneme_docs"></a><h3>Building phoneME Feature Software Documentation</h3>
<!-- END SECTION HEAD -->
<p>

You can create HTML API documents for phoneME Feature software from porting interfaces.
To do this for the phoneME Feature software, use the <code>make docs_html</code> build
target.
<P>

<a name="javadoc"></a>
<strong>Generating Javadoc Tool Documentation</strong>
<p>

Building Javadoc tool documentation is the same for all platforms.
<P>
<ol>
<b><li>Change to the default build directory for your target platform.</b> 
<p>
For example, this could be the Windows x86 target platform, as shown here.
<P>
<code>C:\> cd %COMPONENTS_DIR%/javacall-com/configuration/phoneme_feature/win32_emul</code>
<P>
<b><li>Build Javadoc tool HTML documentation.</b>
<P>
<code>C:\> make docs_html</code>
</ol>
<p>

<a name="view_docs"></a>
<strong>Viewing phoneME Feature Software Documents</strong>
<P>
Use any browser to display the Javadoc output file at the following URL:
<P>
<ul>
<code>file://%MIDP_OUTPUT_DIR%/doc/javadoc/html/index.html</code>
</ul>
<pre>


</pre>

<a href="../index.html">home</a> | <a href="./index_feature.html">first</a> | 
<a href="./cldc_feature.html">prev</a> 
<p>

<!-- =================================== END PAGE BODY ================== -->

<p>
<hr noshade="noshade" size="1">

<p class="copyright"><a href="./style/copyright.html">Copyright</a>
&#169; 2009 Sun Microsystems, Inc. All rights reserved. 
</p>

</div></td></tr></tbody></table></body></html>
